package com.shyroke.daydayzhuanapi.mapper;

import com.shyroke.daydayzhuanapi.dto.SysNoticeDto;
import com.shyroke.daydayzhuanapi.entity.SysNoticeEntity;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class SysNoticeMapper {
    @Autowired
    private ModelMapper modelMapper;

    public SysNoticeDto entityToDto(SysNoticeEntity sysNoticeEntity) {
        return modelMapper.map(sysNoticeEntity,SysNoticeDto.class);
    }
}
